import permission from '@/locales/lang/en-US/account/permission.ts'


export interface UserPassLoginParam {
    username: string,
    password: string,
    remember: boolean,
}

export interface PhoneCodeLoginParam {
    phone: string,
    code: string,
    remember: string,
}

export interface UserPassLoginRes {
    token: string,
    userInfo: UserInfo,
}

export interface CommonRes<T> {
    code: number,
    message: string,
    data: T
    errors: string
    success: boolean
}


export interface Permissions {
  roleId: number;
  permissionCode: string;
  permissionName: string;
  actions?: string;
  createdTime: string;
  updatedTime: string;
  createdUserId: number;
  updatedUserId: number;
}

export interface Role {
  Id?: number;
  roleName?: string;
  roleCode?: string;
  description?: string;
  permissions?: Permissions[];
  createdTime?: string;
  updatedTime?: string;
  createdUserId?: number;
  updatedUserId?: number;
}


export interface UserInfo {
  id?: number,
  username?: string,
  nickname?: string,
  status?: string,
  avatar?: string,
  roles?: Role,
  phone?: string,
}
